package com.learning.platform.dto;

import jakarta.validation.constraints.NotNull;

import java.util.List;

public class ExamSubmitRequest {
    
    @NotNull(message = "考试记录ID不能为空")
    private Long recordId;
    
    @NotNull(message = "答案列表不能为空")
    private List<AnswerSubmit> answers;
    
    // 内部类：答案提交
    public static class AnswerSubmit {
        @NotNull(message = "题目ID不能为空")
        private Long questionId;
        
        private String answer; // JSON格式的答案
        
        // Getters and Setters
        public Long getQuestionId() {
            return questionId;
        }
        
        public void setQuestionId(Long questionId) {
            this.questionId = questionId;
        }
        
        public String getAnswer() {
            return answer;
        }
        
        public void setAnswer(String answer) {
            this.answer = answer;
        }
    }
    
    // Constructors
    public ExamSubmitRequest() {}
    
    // Getters and Setters
    public Long getRecordId() {
        return recordId;
    }
    
    public void setRecordId(Long recordId) {
        this.recordId = recordId;
    }
    
    public List<AnswerSubmit> getAnswers() {
        return answers;
    }
    
    public void setAnswers(List<AnswerSubmit> answers) {
        this.answers = answers;
    }
}